#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;

class Solution {
public:
    bool checkStraightLine(vector<vector<int>>& coordinates) {
        //怎么都得有两个点，先拿这两个点建一条直线
        vector<int> first = coordinates[0];
        vector<int> second = coordinates[1];
        if((second[0]-first[0])!=0){
            double k = double(second[1]-first[1])/double(second[0]-first[0]);
            for(int i = 2;i<coordinates.size();++i){
                if((coordinates[i][1]-second[1])!=k*(coordinates[i][0]-second[0])){
                    return false;
                }
            }
        }
        else{
            for(int i = 0;i<coordinates.size();++i){
                if(coordinates[i][0]!=second[0]){
                    return false;
                }
            }
        }
        return true;      
    }
};

int main(){
    Solution S;
    vector<vector<int>> V = {{2,1},{4,2},{6,3}};
    cout<<S.checkStraightLine(V)<<endl;
}